<%@page import="com.gfa4j.resource.ResourceManagerServer"%>
<%@page import="com.wef.common.util.CommonMessageDomain"%>
<%@ include file="/pages/common/taglib.jsp"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
		<title></title>
		<%@include file="/styles/css_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/css_lib.jsp"%>
		<link rel="stylesheet" type="text/css" href="${ctx}/pages/demo/demo.css" />
		
		<%@include file="/pages/common/js_global.jsp"%>
		<%@include file="/scripts/sdk/js_lib.jsp"%>
		<%@include file="/scripts/config/js_lib.jsp" %>
		<%@include file="/scripts/utils/js_lib.jsp"%>
		<%@include file="/scripts/i18n/js_lib.jsp"%>
		<%@include file="/scripts/format/js_lib.jsp"%>
		<%@include file="/scripts/validate/js_lib.jsp"%>
		<%@include file="/scripts/widgets/jquery-ui/js_lib.jsp"%>
		<script type="text/javascript" src="${ctx}/pages/demo/demo.js"></script>
		
		<script type="text/javascript">
			$(window).ready(function(){
				
				//初始化控件验证规则
				$.jqValidator.initValidateRules("#form1");
				//初始化控件格式化规则
				$.jqFormatter.initFormatRules("#form1");
				
				$("a[id^='aDiv']").click(function(){
					var num = $(this).attr("id").substr(4,2);
					$('#div'+num).attr('title',i18n.message.msg).dialog($.extend({},dialogConfig));
				});
				
				$('#btn1').click(function(){
					alert($('#checkbox1').val());
				});
				
				$('#btn2').click(function(){
					alert($('#checkbox2').val());
				});
				
				$('#btn3').click(function(){
					alert($('#checkbox3').val());
				});
				
			});
		</script>
	</head>
<body class="body">
	<!--Content-->
	<form action="" id="form1">
		<div id="Content_Show">
			<div>
				<!-- ------------------------------------------------------------------------------------------ -->
				<div class="Desc">
					功能：1.复选(true/false)，如下：(<a href="#" id="aDiv1">查看源码</a>)
				</div>
				<div id="div1" style="display: none;">
					复选(true/false)：&lt;k:checkbox property="checkbox" formatRules="{checkedValueMap:{checked:true,unChecked:false}}"/&gt;
				</div>
				<div>
					&nbsp;&nbsp;复选(true/false)：<k:checkbox property="checkbox" styleId="checkbox1" formatRules="{checkedValueMap:{checked:true,unChecked:false}}"/><k:button styleId="btn1" text="查看" />
				</div>
				<br />
				<!-- ------------------------------------------------------------------------------------------ -->
				<div class="Desc">
					功能：2.复选(yes/no)，如下：(<a href="#" id="aDiv2">查看源码</a>)
				</div>
				<div id="div2" style="display: none;">
					复选(yes/no)：&lt;k:checkbox property="checkbox" formatRules="{checkedValueMap:{checked:'yes',unChecked:'no'}}"/&gt;
				</div>
				<div>
					&nbsp;&nbsp;复选(yes/no)：<k:checkbox property="checkbox" styleId="checkbox2" formatRules="{checkedValueMap:{checked:'yes',unChecked:'no'}}"/><k:button styleId="btn2" text="查看" />
				</div>
				<br />
				<!-- ------------------------------------------------------------------------------------------ -->
				<div class="Desc">
					功能：3.复选(启用/禁用)，如下：(<a href="#" id="aDiv3">查看源码</a>)
				</div>
				<div id="div3" style="display: none;">
					复选(启用/禁用)：&lt;k:checkbox property="checkbox" formatRules="{checkedValueMap:{checked:'启用',unChecked:'禁用'}}"/&gt;
				</div>
				<div>
					&nbsp;&nbsp;复选(启用/禁用)：<k:checkbox property="checkbox" styleId="checkbox3" formatRules="{checkedValueMap:{checked:'启用',unChecked:'禁用'}}"/><k:button styleId="btn3" text="查看" />
				</div>
				<br />
				<!-- ------------------------------------------------------------------------------------------ -->
				<div class="Desc">
					功能：4.原生复选，如下：(<a href="#" id="aDiv4">查看源码</a>)
				</div>
				<div id="div4" style="display: none;">
					原生复选：&lt;k:checkbox property="checkbox" text="游泳"/&gt;</br>
							&lt;k:checkbox property="checkbox" text="跑步"/&gt;</br>
							&lt;k:checkbox property="checkbox" text="篮球"/&gt;</br>
				</div>
				<div>
					&nbsp;&nbsp;原生复选：
						<k:checkbox property="checkbox" text="游泳"/>
						<k:checkbox property="checkbox" text="跑步"/>
						<k:checkbox property="checkbox" text="篮球"/>
				</div>
				<br />
			</div>
		</div>
	</form>
</body>
</html>